<template>
    <span style="color:red">
        <i class="lefticon el-icon-share"></i><h3 style="display:inline-block">{{text}}</h3><el-button @click="handleClick" type="info" icon="el-icon-message" circle></el-button>
    </span>
</template>
<script>
export default {
    data(){
        return {
        }
    },
    props:{
        text:{
            type:String,
            default:'Vue 后台管理系统'
        }
    },
    created(){
        this.$on('myevent',this.handleCreated);
    },
    methods:{
        handleCreated(e){
            console.log(e);
        },
        handleClick(e){
            console.log(e);
            this.$emit('myevent','$emit-argument');
        }
    }
}
</script>
<style scoped>
    .lefticon {
        color:rgb(55, 56, 55) !important;
        font-size: 30px;
        padding-right: 20px;
    }
    h3 {
        font-size: 25px;
        color: #636a70 !important;
        letter-spacing: 5px;
    }
</style>